package com.demoCode.api.user;

import com.demoCode.model.auth.dto.AuthLoginDto;
import com.demoCode.model.auth.dto.AuthRegisterDto;
import com.demoCode.model.auth.vo.AuthLoginVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;

@FeignClient("demoCode-user")
public interface UserServiceClient {

    /**
     * 用户登录
     * @param authLoginDto 登录请求体
     * @return 登录结果
     */
    @PostMapping("/user/login")
    AuthLoginVo userLogin(AuthLoginDto authLoginDto);

    /**
     * 用户注册
     * @param authRegisterDto 注册请求体
     * @return 注册结果
     */
    @PostMapping("/user/register")
    Boolean userRegister(AuthRegisterDto authRegisterDto);

    @GetMapping("/user/logout")
    Boolean userLogout();
}
